<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead"><em>甘特图</em></div>
    </div>
    <div class="panel-body">
        <div id="gantt_here" style="width:100%; height:500px;"></div>
    </div>
</div>

<link rel="stylesheet" href="https://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.css" type="text/css">
<script src="https://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.js"></script>

<script>
    $(function () {
        gantt.config.xml_date = "%Y-%m-%d %H:%i";
        gantt.init("gantt_here");

        // 加载数据
        $.ajax({
            url: '{:url("schedule/gantt")}?ids={$Request.param.ids}',
            type: 'GET',
            dataType: 'json',
            success: function(res) {
                if (res.code == 1) {
                    gantt.parse({
                        data: res.data
                    });
                }
            }
        });
    });
</script>

